<?php

/**
 * @Author:      lyt
 * @DateTime:    2015-10-13 16:07:33
 * @Description: 用于维护 耗材品类的model
 */

class SupplySubject extends Eloquent
{

    protected $table = "supply_subject";

     public static $status = array(
        "1"=>"开启",
        "0"=>"关闭",
    );


     
     
     /**
      * @Author:      lyt
      * @DateTime:    2015-10-13 16:06:43
      * @Description: 参数的数组 用于保存一个耗材品类信息
      */
    public static function saveByDate($date){
    	$si=new SupplySubject();
  	  $si->name=$date['name'];
      $si->sort=$date['sort'];
      $si->status=$date['status'];
      $si->desc=$date['desc'];
      $si->save();
      return $si;
    }    

}
